<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page pageEncoding="UTF-8" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>Dishes</title>
    <meta charset="UTF-8"/>
    <LINK REL=StyleSheet HREF="admin-style.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<section id="container" class="round">
<div id="header">
    <a href='admin.html'>
        <img id="logo" src="logo.jpg"/>
    </a>
</div>
<table class="round" id="list-table">
    <thead>
    <tr>
        <th>Картинка</th>
        <th>Название</th>
        <th>Описание</th>
        <th>Стоимость</th>
        <th>Раздел меню</th>
        <th>Доступно</th>
        <th>Действие</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="dish" items="${requestScope.dishes}">
        <tr>
            <td><img src="${dish.image}" width="50"/></td>
            <td>${dish.name}</td>
            <td>${dish.description}</td>
            <td>${dish.price}</td>
            <td>${dish.tag.name}</td>
            <td>${dish.available}</td>
            <td><a href="editDish?id=${dish.id}">Редактировать</a></td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div style="text-align: center;">
<a href="editDish">Добавить</a>
</div>
</section>
</body>
</html>
